Repository navigation
feat(offload): add docker-offload-plugin deb/rpm packaging - #562
Conversation
| # Packages only the prebuilt linux binaries; darwin and windows ship through the source repo. | ||
| offload = ["linux/amd64", "linux/arm64"] |
There was a problem hiding this comment.
I think ideally, we'd also publish static binaries through download.docker.com for the other platforms. While GitHub "works" to distribute binaries, it's not always ideal, and having a more "official" distribution channel through download.docker.com is good to have.
(we're in process of providing static binaries for all packages that we also provide deb / rpm packages for).
There was a problem hiding this comment.
I'd like to do this eventually, I have some tickets to follow up on mac and windows binaries, so will revisit in another PR.
fb63f47 to
01bfdab
Compare
| variable "VERSION" { | ||
| description = "Version to build, with v prefix, for example v0.7.52. Only used for the offload package, whose source tree is passed in as the src named context." | ||
| default = null | ||
| } | ||
| variable "COMMIT" { | ||
| description = "Short commit of the source tree. Only used for the offload package." | ||
| default = null | ||
| } | ||
| variable "BUILD" { | ||
| description = "Build number of the release build. Only used for the offload package." | ||
| default = null | ||
| } | ||
| variable "DATE" { | ||
| description = "Commit date of the release tag (YYYY-MM-DD). Only used for the offload package." | ||
| default = null | ||
| } |
There was a problem hiding this comment.
These should have OFFLOAD_ prefix like the other packages
| ARG NIGHTLY_BUILD | ||
| ARG VERSION |
There was a problem hiding this comment.
If we're not including it in nightly anyway, we can just get rid of the NIGHTLY related variables
| --define "_release ${PKG_RPM_RELEASE:-1}" | ||
| --define "_srcdir ${SRCDIR}" | ||
| --define "_commit ${COMMIT:-$nil}" | ||
| --define "_build ${BUILD:-$nil}" |
There was a problem hiding this comment.
_build is already a built-in RPM macro, I'd suggest renaming it to avoid confusion/clashing:
| --define "_build ${BUILD:-$nil}" | |
| --define "_buildnum ${BUILD:-$nil}" |
|
Why not using remote override like sbx does? https://github.com/docker/packaging#remote-override It's misleading that I can't build this package if I don't have access to sources |
|
@crazy-max I think this was @vvoland's preference so that we could maintain it to stay aligned with the other packages; IIRC, for sbx that was also the preferred option, but there were some bits that made that not possible |
vvoland
left a comment
There was a problem hiding this comment.
LGTM, I think we might hit some issues with the reproducibility of the binaries, but we can figure it out in the follow ups
| env: | ||
| # offload builds from a private source tree and is built from its own repo. | ||
| DISABLED_PACKAGES: offload |
There was a problem hiding this comment.
Not for this PR but we could derive package list from Bake instead of scanning pkg/
|
@thaJeztah @vvoland Maybe we could add CODEWONERS and labeler for offload: |
|
Yup, won't hurt to do so as well; the CODEOWNERS is not a blocker for me though (can be a follow-up). |
Compile the plugin in the package build (dh_auto_build, rpm %build) through the ce-release make target of the source tree, instead of packaging prebuilt binaries. - source tree passed in as the src named context, dependencies vendored; no git clone - GO_VERSION pinned to the release toolchain (1.27.3) - strip overrides kept so the packaged binary matches the release binary - offload excluded from the nightly package list - drop offload from PKGS_BASE; callers add it via PKGS_EXTRA Signed-off-by: Nick Sieger <nick@nicksieger.com>
dc3935e to
a8aaa8f
Compare
Summary
pkg/offload), for ubuntu2404, ubuntu2604 and rockylinux8 on linux/amd64 and linux/arm64.dh_auto_buildand the rpm%build, through thece-releasemake target of the source tree, aspkg/modeldoes.PKG_REPO/PKG_REFclone. The caller passes the vendored source tree as thesrcnamed context, and builds run from the source repo's own workflow.PKGS_BASE, sodocker buildx bake pkgdoes not include it. The caller adds it withPKGS_EXTRAin a remote Bake override (see Remote override). The override also declares the release inputs (VERSION,COMMIT,BUILD,DATE) and sets them as args on_pkg-offload, along with thebuild-envfile secret. No shared Bake variable orpkg.secretchange is needed..pkgs.yml), which builds everypkg/*directory.GO_VERSIONis pinned to the release toolchain (1.27.3). The strip steps are disabled (override_dh_stripfor deb,__brp_stripand__brp_strip_comment_notefor rpm), so the build is reproducible and the packaged binary matches the release binary.🤖 Generated with Claude Code